#!/bin/bash
#
# Notify Beocreate if MPD database has been changed
while :
do
  mpc idle database
  if [ "$?" != "0" ]; then
    sleep 10
  else
    echo "received database update, notifying UI"
    curl -X POST http://127.0.0.1/mpd/update
  fi
done

